if(typeof BX.UI.EntityConfigurationManager==="undefined"){BX.UI.EntityConfigurationManager=function(){this.id="";this._editor=null};BX.UI.EntityConfigurationManager.prototype={initialize:function(t,e){this.id=BX.type.isNotEmptyString(t)?t:BX.util.getRandomString(4);this._editor=e.editor},isSelectionEnabled:function(){return this._editor.getUserFieldManager().isSelectionEnabled()},isCreationEnabled:function(){return this._editor.getUserFieldManager().isCreationEnabled()},isMandatoryControlEnabled:function(){return this._editor.getUserFieldManager().isMandatoryControlEnabled()},getTypeInfos:function(){return this._editor.getUserFieldManager().getTypeInfos()},getCreationPageUrl:function(t){return this._editor.getUserFieldManager().getCreationPageUrl()},openCreationPageUrl:function(t){var e=new BX.Event.BaseEvent({data:{isCanceled:false}});BX.Event.EventEmitter.emit("BX.UI.EntityConfigurationManager:onCreateClick",e);if(!e.getData().isCanceled){window.open(this.getCreationPageUrl(t))}},hasExternalForm:function(t){return t==="custom"},createFieldConfigurator:function(t,e){if(!BX.type.isPlainObject(t)){throw"BX.UI.EntityConfigurationManager: The 'params' argument must be object."}var i=BX.prop.get(t,"field",null);if(!i||i.getType()==="userField"&&this._editor.getUserFieldManager().isModificationEnabled()){return this.getUserFieldConfigurator(t,e)}else{return this.getSimpleFieldConfigurator(t,e)}},getSimpleFieldConfigurator:function(t,e){var i="";var n=BX.prop.get(t,"field",null);if(n){i=n.getType();n.setVisible(false)}else{i=BX.prop.get(t,"typeId",BX.UI.EntityUserFieldType.string)}return this._fieldConfigurator=BX.UI.EntityEditorFieldConfigurator.create("",{editor:this._editor,schemeElement:null,model:e._model,mode:BX.UI.EntityEditorMode.edit,parent:e,typeId:i,field:n,mandatoryConfigurator:t.mandatoryConfigurator})},getUserFieldConfigurator:function(t,e){var i="";var n=BX.prop.get(t,"field",null);if(n){if(!(n instanceof BX.UI.EntityEditorUserField)){throw"BX.UI.EntityConfigurationManager: The 'field' param must be EntityEditorUserField."}i=n.getFieldType();n.setVisible(false)}else{i=BX.prop.get(t,"typeId",BX.UI.EntityUserFieldType.string)}return BX.UI.EntityEditorUserFieldConfigurator.create("",{editor:this._editor,schemeElement:null,model:e.getModel(),mode:BX.UI.EntityEditorMode.edit,parent:e,typeId:i,field:n,enableMandatoryControl:BX.prop.getBoolean(t,"enableMandatoryControl",true),mandatoryConfigurator:t.mandatoryConfigurator,showAlways:true})}};BX.UI.EntityConfigurationManager.create=function(t,e){var i=new BX.UI.EntityConfigurationManager;i.initialize(t,e);return i}}if(typeof BX.UI.EntityEditorFieldConfigurator==="undefined"){BX.UI.EntityEditorFieldConfigurator=function(){BX.UI.EntityEditorFieldConfigurator.superclass.constructor.apply(this);this._field=null;this._typeId="";this._isLocked=false;this._labelInput=null;this._saveButton=null;this._cancelButton=null;this._isTimeEnabledCheckBox=null;this._isRequiredCheckBox=null;this._isMultipleCheckBox=null;this._showAlwaysCheckBox=null;this._optionWrapper=null;this._enumConfigurator=null;this._enableMandatoryControl=true;this._mandatoryConfigurator=null};BX.extend(BX.UI.EntityEditorFieldConfigurator,BX.UI.EntityEditorControl);BX.UI.EntityEditorFieldConfigurator.prototype.doInitialize=function(){BX.UI.EntityEditorFieldConfigurator.superclass.doInitialize.apply(this);this._field=BX.prop.get(this._settings,"field",null);if(this._field){this.checkField()}this._enableMandatoryControl=BX.prop.getBoolean(this._settings,"enableMandatoryControl",true);this._mandatoryConfigurator=BX.prop.get(this._settings,"mandatoryConfigurator",null);this._typeId=BX.prop.getString(this._settings,"typeId","")};BX.UI.EntityEditorFieldConfigurator.prototype.checkField=function(){};BX.UI.EntityEditorFieldConfigurator.prototype.getDefaultFieldLabel=function(){var t=this._editor.getUserFieldManager();return this._field?this._field.getTitle():t.getDefaultFieldLabel(this._typeId)};BX.UI.EntityEditorFieldConfigurator.prototype.layout=function(t){if(this._hasLayout){return}if(this._mode===BX.UI.EntityEditorMode.view){throw"EntityEditorFieldConfigurator. View mode is not supported by this control type."}this._wrapper=BX.create("div",{props:{className:"ui-entity-editor-content-block-new-fields"}});this.layoutInternal();this.registerLayout(t);this._hasLayout=true};BX.UI.EntityEditorFieldConfigurator.prototype.layoutInnerConfigurator=function(t,e,i){if(BX.Type.isPlainObject(t)&&BX.Type.isArray(e)&&this._enumConfigurator===null){var n=[];for(var r=0;r<e.length;r++){n.push({ID:e[r]["VALUE"],VALUE:e[r]["NAME"],XML_ID:""})}this._enumConfigurator=BX.UI.EntityEditorEnumConfigurator.create({enumInfo:{enumItems:n,innerConfig:t},wrapper:this._wrapper,nextNode:BX.Type.isDomNode(i)?i:null});this._enumConfigurator.layout()}};BX.UI.EntityEditorFieldConfigurator.prototype.layoutInternal=function(){this._wrapper.appendChild(this.getInputContainer());if(this._typeId==="list"&&(!this._field||this._field.getEditor().canChangeCommonConfiguration())){this.layoutInnerConfigurator(this._field.getInnerConfig(),this._field.getItems())}this._wrapper.appendChild(this.getOptionContainer());this._wrapper.appendChild(BX.create("hr",{props:{className:"ui-entity-editor-line"}}));this._wrapper.appendChild(this.getButtonContainer())};BX.UI.EntityEditorFieldConfigurator.prototype.getInputTitle=function(){return this._field.getTitle()};BX.UI.EntityEditorFieldConfigurator.prototype.getInputContainer=function(){this._labelInput=BX.create("input",{attrs:{className:"ui-ctl-element",type:"text",value:this.getInputTitle()}});return BX.create("div",{props:{className:"ui-entity-editor-content-block"},children:[BX.create("div",{props:{className:"ui-entity-editor-block-title"},children:[BX.create("span",{attrs:{className:"ui-entity-editor-block-title-text"},text:BX.message("UI_ENTITY_EDITOR_FIELD_TITLE")})]}),BX.create("div",{props:{className:"ui-entity-editor-content-block"},children:[BX.create("div",{props:{className:"ui-ctl ui-ctl-textbox ui-ctl-w100"},children:[this._labelInput]})]})]})};BX.UI.EntityEditorFieldConfigurator.prototype.getOptionContainer=function(){this._optionWrapper=BX.create("div",{props:{className:"ui-entity-editor-content-block"}});if(this._field.areAttributesEnabled()&&!this._field.isRequired()&&this._mandatoryConfigurator){this._isRequiredCheckBox=this.createOption({caption:this._mandatoryConfigurator.getTitle()+":",containerSettings:{style:{alignItems:"center"}},elements:this._mandatoryConfigurator.getButton().prepareLayout()});this._isRequiredCheckBox.checked=!this._mandatoryConfigurator.isEmpty();this._mandatoryConfigurator.setSwitchCheckBox(this._isRequiredCheckBox);this._mandatoryConfigurator.setLabel(this._isRequiredCheckBox.nextSibling);this._mandatoryConfigurator.setEnabled(this._isRequiredCheckBox.checked);this._mandatoryConfigurator.adjust()}this._showAlwaysCheckBox=this.createOption({caption:BX.message("UI_ENTITY_EDITOR_SHOW_ALWAYS")});this._showAlwaysCheckBox.checked=this._field.checkOptionFlag(BX.UI.EntityEditorControlOptions.showAlways);return BX.create("div",{props:{className:"ui-entity-editor-content-block ui-entity-editor-content-block-checkbox"},children:[this._optionWrapper]})};BX.UI.EntityEditorFieldConfigurator.prototype.getButtonContainer=function(){this._saveButton=BX.create("span",{props:{className:"ui-btn ui-btn-primary"},text:BX.message("UI_ENTITY_EDITOR_SAVE"),events:{click:BX.delegate(this.onSaveButtonClick,this)}});this._cancelButton=BX.create("span",{props:{className:"ui-btn ui-btn-light-border"},text:BX.message("UI_ENTITY_EDITOR_CANCEL"),events:{click:BX.delegate(this.onCancelButtonClick,this)}});return BX.create("div",{props:{className:"ui-entity-editor-content-block-new-fields-btn-container"},children:[this._saveButton,this._cancelButton]})};BX.UI.EntityEditorFieldConfigurator.prototype.getIsTimeEnabledCheckBox=function(){var t=null;if(this._field===null&&(this._typeId==="datetime"||this._typeId==="date")){t=this.createOption({caption:BX.message("UI_ENTITY_EDITOR_UF_ENABLE_TIME")})}return t};BX.UI.EntityEditorFieldConfigurator.prototype.getMultipleCheckBox=function(){var t=null;if(this._field===null&&this._typeId!=="boolean"){t=this.createOption({caption:BX.message("UI_ENTITY_EDITOR_UF_MULTIPLE_FIELD")})}return t};BX.UI.EntityEditorFieldConfigurator.prototype.getIsRequiredCheckBox=function(){var t=null;if(this._field!==null&&this._field.areAttributesEnabled()&&!this._field.isRequired()&&this._mandatoryConfigurator){t=this.createOption({caption:this._mandatoryConfigurator.getTitle()+":",containerSettings:{style:{alignItems:"center"}},elements:this._mandatoryConfigurator.getButton().prepareLayout()});t.checked=!this._mandatoryConfigurator.isEmpty();this._mandatoryConfigurator.setSwitchCheckBox(t);this._mandatoryConfigurator.setLabel(t.nextSibling);this._mandatoryConfigurator.setEnabled(t.checked);this._mandatoryConfigurator.adjust()}return t};BX.UI.EntityEditorFieldConfigurator.prototype.clearLayout=function(){if(!this._hasLayout){return}this._wrapper=BX.remove(this._wrapper);this._labelInput=null;this._saveButton=null;this._cancelButton=null;this._isRequiredCheckBox=null;this._showAlwaysCheckBox=null;this._optionWrapper=null;this._hasLayout=false};BX.UI.EntityEditorFieldConfigurator.prototype.createOption=function(t){var e=BX.create("input",{props:{className:"ui-ctl-element",type:"checkbox"}});var i=BX.create("div",{props:{className:"ui-ctl ui-ctl-wa ui-ctl-checkbox ui-ctl-xs"},style:{marginBottom:0},children:[BX.create("label",{children:[e,BX.create("span",{props:{className:"ui-ctl-label-text"},text:BX.prop.getString(t,"caption","")})]})]});var n=BX.prop.getObject(t,"labelSettings",null);if(n){BX.adjust(i,n)}var r=BX.prop.getString(t,"helpCode","");if(r){i.appendChild(BX.create("span",{props:{className:"ui-entity-editor-new-field-helper-icon"},events:{click:function(){top.BX.Helper.show("redirect=detail&code="+r)}}}))}else{var o=BX.prop.getString(t,"helpUrl","");if(o!==""){i.appendChild(BX.create("a",{props:{className:"ui-entity-editor-new-field-helper-icon",href:o,target:"_blank"}}))}}var a=[i];var s=BX.prop.getArray(t,"elements",[]);for(var l=0,u=s.length;l<u;l++){a.push(s[l])}var d=BX.create("div",{children:a});var p=BX.prop.getObject(t,"containerSettings",null);if(p){BX.adjust(d,p)}this._optionWrapper.appendChild(d);return e};BX.UI.EntityEditorFieldConfigurator.prototype.onSaveButtonClick=function(t){if(this._isLocked){return}if(this._mandatoryConfigurator){if(this._mandatoryConfigurator.isChanged()){this._mandatoryConfigurator.acceptChanges()}this._mandatoryConfigurator.close()}var e=this.prepareSaveParams();BX.onCustomEvent(this,"onSave",[this,e])};BX.UI.EntityEditorFieldConfigurator.prototype.prepareSaveParams=function(){var t={typeId:this._typeId,label:this._labelInput.value};if(this._field){t["field"]=this._field;t["mandatory"]=this._isRequiredCheckBox?this._isRequiredCheckBox.checked:this._field.isRequired()||this._field.isRequiredByAttribute()}else{if(this._isRequiredCheckBox){t["mandatory"]=this._isRequiredCheckBox.checked}}t["showAlways"]=this._showAlwaysCheckBox.checked;t["settings"]=t["settings"]||[];if(this._useTimezoneCheckBox){t["settings"]["USE_TIMEZONE"]=this._useTimezoneCheckBox.checked?"Y":"N"}if(this._typeId==="list"&&this._enumConfigurator){t["innerConfig"]=this._field?this._field.getInnerConfig():{};t["enumeration"]=this._enumConfigurator.prepareSaveParams()}return t};BX.UI.EntityEditorFieldConfigurator.prototype.onCancelButtonClick=function(t){if(this._isLocked){return}var e={typeId:this._typeId};if(this._field){e["field"]=this._field}BX.onCustomEvent(this,"onCancel",[this,e])};BX.UI.EntityEditorFieldConfigurator.prototype.setLocked=function(t){t=!!t;if(this._isLocked===t){return}this._isLocked=t;if(this._isLocked){BX.addClass(this._saveButton,"ui-btn-clock")}else{BX.removeClass(this._saveButton,"ui-btn-clock")}};BX.UI.EntityEditorFieldConfigurator.prototype.getField=function(){return this._field};BX.UI.EntityEditorFieldConfigurator.create=function(t,e){var i=new BX.UI.EntityEditorFieldConfigurator;i.initialize(t,e);return i}}if(typeof BX.UI.EntityEditorEnumConfigurator==="undefined"){BX.UI.EntityEditorEnumConfigurator=function(){this._settings=null;this._enumInfo=null;this._wrapper=null;this._nextNode=null;this._enumItemWrapper=null;this._enumItemContainer=null;this._enumButtonWrapper=null;this._draggable=null;this._enumItems=[];this.displaySelect=null;this.displaySelectValue=null;this.defaultDisplaySelectValue="UI";this.showDisplaySettings=null};BX.UI.EntityEditorEnumConfigurator.prototype={initialize:function(t){this._settings=t?t:{};this._enumInfo=BX.prop.getObject(this._settings,"enumInfo",{});this._wrapper=BX.prop.getElementNode(this._settings,"wrapper",null);this._nextNode=BX.prop.getElementNode(this._settings,"nextNode",null);this.showDisplaySettings=BX.prop.getBoolean(this._settings,"showDisplaySettings",false);this.displaySelectValue=BX.prop.getString(this._settings,"display",this.defaultDisplaySelectValue);if(!this.displaySelectValue.length){this.displaySelectValue=this.defaultDisplaySelectValue}},layout:function(){if(BX.Type.isDomNode(this._wrapper)){this.layoutElements();if(this.showDisplaySettings){this.layoutDisplay()}}},layoutElements:function(){var t=BX.Type.isDomNode(this._nextNode);var e=this.getEnumerationContainer();var i=[BX.create("hr",{props:{className:"ui-entity-editor-line"}}),BX.create("div",{props:{className:"ui-entity-editor-block-title"},children:[BX.create("span",{attrs:{className:"ui-entity-editor-block-title-text"},text:BX.message("UI_ENTITY_EDITOR_UF_ENUM_ITEMS")})]}),e];for(var n=0;n<i.length;n++){if(t){this._wrapper.insertBefore(i[n],this._nextNode)}else{this._wrapper.appendChild(i[n])}}},layoutDisplay:function(){var t=BX.Dom.create("div",{attrs:{class:"ui-entity-editor-content-block",style:"padding-right:38px;"},html:'<hr class="ui-entity-editor-line">'});var e=BX.Dom.create("div",{attrs:{class:"ui-entity-editor-block-title"},children:[BX.Dom.create("span",{attrs:{class:"ui-entity-editor-block-title-text"},props:{text:BX.Loc.getMessage("UI_ENTITY_EDITOR_UF_ENUM_ITEMS")}})]});t.appendChild(e);e.appendChild(this.getDisplaySelect());if(BX.Type.isDomNode(this._nextNode)){this._wrapper.insertBefore(t,this._nextNode)}else{this._wrapper.appendChild(t)}},getDisplaySelect:function(){if(!this.displaySelect){var t=BX.Dom.create("select",{attrs:{className:"main-ui-control main-enum-dialog-input"},props:{name:"display"}});var e={UI:BX.Loc.getMessage("UI_ENTITY_EDITOR_UF_ENUM_DISPLAY_UI"),DIALOG:BX.Loc.getMessage("UI_ENTITY_EDITOR_UF_ENUM_DISPLAY_DIALOG"),LIST:BX.Loc.getMessage("UI_ENTITY_EDITOR_UF_ENUM_DISPLAY_LIST"),CHECKBOX:BX.Loc.getMessage("UI_ENTITY_EDITOR_UF_ENUM_DISPLAY_CHECKBOX")};for(var i in e){var n=BX.Dom.create("option",{attrs:{value:i},props:{text:e[i]}});t.appendChild(n)}t.value=this.getDisplaySelectValue();this.displaySelect=t}return this.displaySelect},getDisplaySelectValue:function(){return this.displaySelect?this.displaySelect.value:this.displaySelectValue},getEnumerationContainer:function(){this._enumItemWrapper=BX.create("div",{props:{className:"ui-entity-editor-content-block"}});this._enumItemContainer=BX.create("div",{props:{className:"ui-entity-editor-content-block"}});this._enumItemWrapper.appendChild(this._enumItemContainer);this._enumButtonWrapper=BX.create("div",{props:{className:"ui-entity-editor-content-block-add-field"}});this._enumItemWrapper.appendChild(this._enumButtonWrapper);this._enumButtonWrapper.appendChild(BX.create("span",{props:{className:"ui-entity-card-content-add-field"},events:{click:BX.delegate(this.onEnumerationItemAddButtonClick,this)},text:BX.message("UI_ENTITY_EDITOR_ADD")}));var t=BX.Runtime.clone(BX.prop.getArray(this._enumInfo,"enumItems",[]));var e=BX.prop.getObject(this._enumInfo,"innerConfig",{});var i=BX.prop.getObject(e,"itemsConfig",{});var n=BX.prop.getArray(i,"fakeValues",[]);var r=BX.prop.getArray(i,"systemValues",[]);var o=BX.prop.getObject(i,"systemInitText",{});for(var a=0,s=t.length;a<s;a++){if(t[a].hasOwnProperty("ID")){var l=t[a]["ID"];var u=n.indexOf(l)>=0;var d=r.indexOf(l)>=0;var p=d&&o.hasOwnProperty(l)&&BX.Type.isString(o[l]);t[a]["IS_FAKE"]=u?"Y":"N";t[a]["IS_SYSTEM"]=d?"Y":"N";t[a]["INIT_TEXT"]=p?o[l]:""}this.createEnumerationItem(t[a])}this.createEnumerationItem();this._draggable=new BX.UI.DragAndDrop.Draggable({container:this._enumItemContainer,draggable:".ui-ctl-row",dragElement:".ui-ctl-row-draggable",type:BX.UI.DragAndDrop.Draggable.CLONE});return this._enumItemWrapper},onEnumerationItemAddButtonClick:function(t){this.createEnumerationItem().focus()},createEnumerationItem:function(t){var e=BX.UI.EntityEditorFieldConfiguratorEnumItem.create("",{configurator:this,container:this._enumItemContainer,data:t});this._enumItems.push(e);e.layout();return e},removeEnumerationItem:function(t){for(var e=0,i=this._enumItems.length;e<i;e++){if(this._enumItems[e]===t){this._enumItems[e].clearLayout();this._enumItems.splice(e,1);break}}},prepareSaveParams:function(){var t=[];var e=[];var i;for(var n=0,r=this._enumItems.length;n<r;n++){var o=this._enumItems[n].prepareData();if(!o){continue}var a=BX.util.hashCode(o["VALUE"]);if(BX.util.in_array(a,e)){continue}e.push(a);i=-1;if(this._draggable){i=this._draggable.getElementIndex(this._enumItems[n].getDraggableContainer())}o["SORT"]=i>=0?i*100:(t.length+1)*100;t.push(o)}return t}};BX.UI.EntityEditorEnumConfigurator.create=function(t){var e=new BX.UI.EntityEditorEnumConfigurator;e.initialize(t);return e}}if(typeof BX.UI.EntityEditorFieldConfiguratorEnumItem==="undefined"){BX.UI.EntityEditorFieldConfiguratorEnumItem=function(){this._id="";this._settings=null;this._data=null;this._configurator=null;this._container=null;this._labelInput=null;this._hasLayout=false;this._isFake=null;this._isSystem=null;this._initText="";this._onRevertButtonClickHandler=BX.delegate(this.onRevertButtonClick,this);this._onChangeTextHandler=BX.delegate(this.onChangeText,this)};BX.UI.EntityEditorFieldConfiguratorEnumItem.prototype={initialize:function(t,e){this._id=BX.type.isNotEmptyString(t)?t:BX.util.getRandomString(4);this._settings=BX.type.isPlainObject(e)?e:{};this._data=BX.prop.getObject(this._settings,"data",{});this._configurator=BX.prop.get(this._settings,"configurator");this._container=BX.prop.getElementNode(this._settings,"container");this._isFake=BX.prop.getString(this._data,"IS_FAKE","N")==="Y";this._isSystem=BX.prop.getString(this._data,"IS_SYSTEM","N")==="Y";this._initText=BX.prop.getString(this._data,"INIT_TEXT","")},isFake:function(){return this._isFake},isSystem:function(){return this._isSystem},getDraggableContainer:function(){return this._hasLayout&&BX.Type.isDomNode(this._wrapper)?this._wrapper:null},layout:function(){if(this._hasLayout){return}this._wrapper=BX.create("div",{props:{className:"ui-ctl ui-ctl-textbox ui-ctl-w100 ui-ctl-row"},style:{marginTop:"10px",marginBottom:"10px"}});if(!this.isFake()){this._wrapper.appendChild(BX.create("span",{props:{className:"ui-ctl-row-draggable"}}))}this._labelInput=BX.create("input",{props:{className:"ui-ctl-element",placeholder:BX.message("UI_ENTITY_EDITOR_NEW_LIST_ITEM"),type:"input",value:BX.prop.getString(this._data,"VALUE","")}});this._wrapper.appendChild(this._labelInput);if(this.isFake()){this._labelInput.setAttribute("disabled","");this._labelInput.style.cursor="auto";this._wrapper.appendChild(BX.create("div",{props:{className:"ui-entity-editor-content-remove-block-system"}}))}else if(this.isSystem()){if(this.isInitialTextDifferent()){this._revertButton=BX.create("div",{props:{className:"ui-entity-editor-content-revert-name-block"},events:{click:this._onRevertButtonClickHandler}})}else{this._revertButton=BX.create("div",{props:{className:"ui-entity-editor-content-remove-block-system"}})}this._wrapper.appendChild(this._revertButton);BX.Event.bind(this._labelInput,"keyup",this._onChangeTextHandler);BX.Event.bind(this._labelInput,"input",this._onChangeTextHandler)}else{this._wrapper.appendChild(BX.create("div",{props:{className:"ui-entity-editor-content-remove-block"},events:{click:BX.delegate(this.onDeleteButtonClick,this)}}))}var t=BX.prop.getElementNode(this._settings,"anchor");if(t){this._container.insertBefore(this._wrapper,t)}else{this._container.appendChild(this._wrapper)}this._hasLayout=true},clearLayout:function(){if(!this._hasLayout){return}if(BX.Type.isDomNode(this._revertButton)){BX.Event.unbind(this._revertButton,"click",this._onRevertButtonClickHandler)}if(BX.Type.isDomNode(this._labelInput)){BX.Event.unbind(this._labelInput,"keyup",this._onChangeTextHandler);BX.Event.unbind(this._labelInput,"input",this._onChangeTextHandler)}this._wrapper=BX.remove(this._wrapper);this._hasLayout=false},focus:function(){if(this._labelInput){setTimeout(function(){this._labelInput.focus()}.bind(this),0)}},prepareData:function(){var t=this._labelInput?BX.util.trim(this._labelInput.value):"";if(t===""){return null}var e={IS_FAKE:BX.prop.getString(this._data,"IS_FAKE","N")==="Y"?"Y":"N",IS_SYSTEM:BX.prop.getString(this._data,"IS_SYSTEM","N")==="Y"?"Y":"N",VALUE:t};var i=BX.prop.get(this._data,"ID",null);if(i!==null){e["ID"]=i}var n=BX.prop.get(this._data,"XML_ID",null);if(n!==null){e["XML_ID"]=n}return e},isInitialTextDifferent:function(){return BX.Type.isDomNode(this._labelInput)?this._initText!==this._labelInput.value:false},toggleRevertButton:function(){if(this.isSystem()&&BX.Type.isDomNode(this._revertButton)){var t="ui-entity-editor-content-remove-block-system";var e="ui-entity-editor-content-revert-name-block";if(this.isInitialTextDifferent()){if(BX.Dom.hasClass(this._revertButton,t)){BX.Dom.removeClass(this._revertButton,t);BX.Dom.addClass(this._revertButton,e);BX.Event.bind(this._revertButton,"click",this._onRevertButtonClickHandler)}}else{if(BX.Dom.hasClass(this._revertButton,e)){BX.Dom.removeClass(this._revertButton,e);BX.Dom.addClass(this._revertButton,t);BX.Event.unbind(this._revertButton,"click",this._onRevertButtonClickHandler)}}}},revertText:function(){if(this.isSystem()){if(BX.Type.isStringFilled(this._initText)&&BX.Type.isDomNode(this._labelInput)){this._labelInput.value=this._initText}}},onChangeText:function(){this.toggleRevertButton()},onDeleteButtonClick:function(t){this._configurator.removeEnumerationItem(this)},onRevertButtonClick:function(t){this.revertText();this.toggleRevertButton()}};BX.UI.EntityEditorFieldConfiguratorEnumItem.create=function(t,e){var i=new BX.UI.EntityEditorFieldConfiguratorEnumItem;i.initialize(t,e);return i}}
//# sourceMappingURL=field-configurator.map.js